package com.mdinic.blogovi.front.common.menu;

import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.Panel;

import com.mdinic.blogovi.front.page.BSession;
import com.mdinic.blogovi.front.page.HomePage;
import com.mdinic.blogovi.front.page.blogpost.NewLinksPage;
import com.mdinic.blogovi.front.page.follow.FollowLinksPage;
import com.mdinic.blogovi.front.page.person.PersonTopPage;

public class LinkMenu extends Panel {

    private static final String ID = "link_menu";

    private static final long serialVersionUID = 1L;

    public LinkMenu() {
        super(ID);

        add(new BookmarkablePageLink<HomePage>("home_link", HomePage.class));
        add(new BookmarkablePageLink<NewLinksPage>("new_posts_link", NewLinksPage.class));

        add(new BookmarkablePageLink<FollowLinksPage>("people_i_follow_link", FollowLinksPage.class)
                .setVisible(BSession.get().isLoggedIn()));

        add(new BookmarkablePageLink<PersonTopPage>("top_users_link", PersonTopPage.class));
    }
}
